use std::fmt::Debug;
use thiserror::Error;

#[derive(Error, Debug)]
pub struct FieldTypeError<T, U>
    where T: Debug, U: Debug
{
    pub expected: T,
    pub found: U,
}

#[derive(Error, Debug)]
pub enum SerdeJsonDeserializeError {
    #[error("Invalid filed value (expected {expected}, found {found})")]
    FieldValueError {
        expected: String,
        found: String,
    },
    #[error("Unknown error")]
    Unknown,
}